package com.ruoyi.legal.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.legal.mapper.RecordDetailsViewMapper;
import com.ruoyi.legal.domain.RecordDetailsView;
import com.ruoyi.legal.service.IRecordDetailsViewService;

/**
 * detailService业务层处理
 * 
 * @author xiaoxiao
 * @date 2025-07-01
 */
@Service
public class RecordDetailsViewServiceImpl implements IRecordDetailsViewService 
{
    @Autowired
    private RecordDetailsViewMapper recordDetailsViewMapper;

    /**
     * 查询detail
     * 
     * @param id detail主键
     * @return detail
     */
    @Override
    public RecordDetailsView selectRecordDetailsViewById(Long id)
    {
        return recordDetailsViewMapper.selectRecordDetailsViewById(id);
    }

    /**
     * 查询detail列表
     * 
     * @param recordDetailsView detail
     * @return detail
     */
    @Override
    public List<RecordDetailsView> selectRecordDetailsViewList(RecordDetailsView recordDetailsView)
    {
        return recordDetailsViewMapper.selectRecordDetailsViewList(recordDetailsView);
    }

    /**
     * 新增detail
     * 
     * @param recordDetailsView detail
     * @return 结果
     */
    @Override
    public int insertRecordDetailsView(RecordDetailsView recordDetailsView)
    {
        recordDetailsView.setCreateTime(DateUtils.getNowDate());
        return recordDetailsViewMapper.insertRecordDetailsView(recordDetailsView);
    }

    /**
     * 修改detail
     * 
     * @param recordDetailsView detail
     * @return 结果
     */
    @Override
    public int updateRecordDetailsView(RecordDetailsView recordDetailsView)
    {
        return recordDetailsViewMapper.updateRecordDetailsView(recordDetailsView);
    }

    /**
     * 批量删除detail
     * 
     * @param ids 需要删除的detail主键
     * @return 结果
     */
    @Override
    public int deleteRecordDetailsViewByIds(Long[] ids)
    {
        return recordDetailsViewMapper.deleteRecordDetailsViewByIds(ids);
    }

    /**
     * 删除detail信息
     * 
     * @param id detail主键
     * @return 结果
     */
    @Override
    public int deleteRecordDetailsViewById(Long id)
    {
        return recordDetailsViewMapper.deleteRecordDetailsViewById(id);
    }
}
